import QtQuick
import "qrc:/usv_bridge/UI/compass/"


Rectangle {
    id: gps

    radius: 5
    color:"#F7F7F7"
    //第一行

    Text{
        //system controller var
        id: setpoint_text
        text: qsTr("set 45" + "°")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#0070D6"
        anchors{
            left: parent.left
            leftMargin: 30
            top: parent.top
        }
    }
    Image{
        id: arrow
        anchors{
            left: parent.left
            leftMargin: 10
            verticalCenter: setpoint_text.verticalCenter

        }
        source:"qrc:/usv_bridge/UI/compass/container_icon.png"
    }


    Text{
        //system controller var
        id: hgd_value
        text: qsTr("032"+"°")
        font.family: ("Noto Sans")
        font.pixelSize: 36
        color: "#325B9A"
        anchors{
            top: parent.top
            left: setpoint_text.right
            leftMargin: 25
        }
    }
    // 描述
    Text{
        //system controller var
        id: hgd_unit
        text: qsTr("HGD")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#666666"
        anchors{
            left: hgd_value.right
            top: hgd_value.top
            topMargin: 5
        }
    }

    //竖直分割线
    Rectangle{
        width: 1
        height: 28
        color: Qt.rgba(0, 0, 0, 0.08)
        anchors{
            left: setpoint_text.right
            leftMargin: 13
            verticalCenter: hgd_value.verticalCenter
        }
    }
    //竖直分割线
    Rectangle{
        id: line_split
        width: 1
        height: 28
        color: Qt.rgba(0, 0, 0, 0.08)
        anchors{
            left: hgd_unit.right
            leftMargin: 13
            verticalCenter: hgd_value.verticalCenter
        }
    }

    Text{
        //system controller var
        text: qsTr("GPS 2")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#666666"
        anchors{
            left: hgd_unit.right
            leftMargin: 25
            verticalCenter: hgd_value.verticalCenter
        }
    }


    //第二行
    Text{
        //system controller var
        id: cog_value
        text: qsTr("024"+"°")
        font.family: ("Noto Sans")
        font.pixelSize: 36
        color: "#325B9A"
        anchors{
            top: hgd_value.bottom
            topMargin: 5
            left: hgd_value.left
        }
    }
    // 描述
    Text{
        //system controller var
        id: cog_unit
        text: qsTr("COG")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#666666"
        anchors{
            left: cog_value.right
            top: cog_value.top
            topMargin: 5
        }
    }

    //竖直分割线
    Rectangle{
        width: 1
        height: 28
        color: Qt.rgba(0, 0, 0, 0.08)
        anchors{
            left: line_split.left
            verticalCenter: cog_value.verticalCenter
        }
    }

    Text{
        //system controller var
        text: qsTr("GPS 2")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#666666"
        anchors{
            left: cog_unit.right
            leftMargin: 25
            verticalCenter: cog_value.verticalCenter
        }
    }

    //第三行
    Text{
        //system controller var
        id: rot_value_zero
        text: qsTr("0")
        font.family: ("Noto Sans")
        font.pixelSize: 36
        color: Qt.rgba(0, 0, 0, 0.08)
        anchors{
            top: cog_value.bottom
            topMargin: 5
            left: hgd_value.left
        }
    }
    Text{
        //system controller var
        id: rot_value
        text: qsTr("12"+"°")
        font.family: ("Noto Sans")
        font.pixelSize: 36
        color: "#325B9A"
        anchors{
            top: cog_value.bottom
            topMargin: 5
            right: hgd_value.right
        }
    }
    // 描述
    Text{
        //system controller var
        id: rot_unit
        text: qsTr("ROT")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#666666"
        anchors{
            left: rot_value.right
            top: rot_value.top
            topMargin: 5
        }
    }
    // 描述2
    Text{
        //system controller var
        id: rot_min
        text: qsTr("/min")
        font.family: ("Noto Sans")
        font.pixelSize: 12
        color: "#666666"
        anchors{
            left: rot_value.right
            top: rot_unit.bottom
        }
    }

    //竖直分割线
    Rectangle{
        width: 1
        height: 28
        color: Qt.rgba(0, 0, 0, 0.08)
        anchors{
            left: line_split.left
            verticalCenter: rot_value.verticalCenter
        }
    }

    Text{
        //system controller var
        id: gyr1
        text: qsTr("GYR 1")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#666666"
        anchors{
            left: rot_unit.right
            leftMargin: 28
            verticalCenter: rot_value.verticalCenter
        }
    }

    //横线分割线
    Rectangle{
        id: cross_split_line
        width: 288
        height: 2
        radius: 1
        color: Qt.rgba(0, 0, 0, 0.08)
        anchors{
            top: rot_value.bottom
            topMargin: 10
            horizontalCenter: parent.horizontalCenter
        }
    }

    //GPS坐标
    Text{
        //system controller var
        id: north_lat
        text: qsTr("41"+"°"+"03.441"+"’")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#325B9A"
        anchors{
            top: cross_split_line.bottom
            topMargin: 10
            right: hgd_value.right
        }
    }

    Text{
        //system controller var
        id: north_lat_unit
        text: qsTr("N")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#666666"
        anchors{
            top: north_lat.top
            left: north_lat.right
            leftMargin: 10
        }
    }

    Text{
        //system controller var
        id: west_lon
        text: qsTr("41"+"°"+"03.441"+"’")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#325B9A"
        anchors{
            top: north_lat.bottom
            topMargin: 10
            right: hgd_value.right
        }
    }

    Text{
        //system controller var
        id: west_lon_unit
        text: qsTr("W")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#666666"
        anchors{
            top: west_lon.top
            left: west_lon.right
            leftMargin: 10
        }
    }

    //竖直分割线
    Rectangle{
        id: latlon_split
        width: 1
        height: 28
        color: Qt.rgba(0, 0, 0, 0.08)
        anchors{
            left: line_split.left
            top: north_lat.top
            topMargin: 12
        }
    }

    Text{
        //system controller var
        id: west_lon_gps
        text: qsTr("GPS 3")
        font.family: ("Noto Sans")
        font.pixelSize: 16
        color: "#666666"
        anchors{
            top: north_lat.top
            topMargin: 15
            left: gyr1.left
        }
    }

}
